package com.dnkj.download.task.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @ClassName DateTool
 * @Description TODO
 * @Auth ying.xiao
 * @Date 2021/5/21
 * @Version 1.0.0
 */
public class DateTool {

    private static final String format = "yyyy-MM-dd HH:mm:ss";
    public static Date stringToDate(String date) throws ParseException {
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(format);//注意月份是MM
        Date dateNew = simpleDateFormat.parse(date);
        return dateNew;

    }
}
